python color

55

python color -

# Make sure to run in the right terminal

red = '\033[91m'
green = '\033[92m'
blue = '\033[94m'
bold = '\033[1m'
italics = '\033[3m'
underline = '\033[4m'
end = '\033[0m'

print (red + underline + 'Test!... Test!' + end)

python text color -

from termcolor import colored
print(colored('python', 'green', attrs=['bold']))

Comments

Submit
0 Comments